<?PHP
if (!session_start()) { session_start(); };
/*if (!isset($_SESSION['lgnapproved'])) {
	die(header('Location: login.php'));
}*/
include("functions.php");
include("cnnxn.php");
connect();

$SQLview='SELECT * FROM av_organization;';
//print $SQLview;
$sendit_view=mysqli_query($db,$SQLview) or die(mysqli_error($db));

?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>daleclark.net</title>
<link type="text/css" rel="stylesheet" href="adminstyles.css" />
</head>
<body>
<div id="adminwrapper">
<div id="adminlogo"></div>
<?PHP navigation(); ?>
<div id="admincontent">
<h3>Organization</h3>

<div style="float:left; width:500px; padding-right:25px; margin-right:25px; border-right:1px solid #FFFFFF;">

<?PHP 
$backgroundcolor="#2883D4";
while ($RSview=mysqli_fetch_object($sendit_view)) {
	if ($backgroundcolor=="#2883D4") {
		$backgroundcolor="#2F93E9";
	} else {
		$backgroundcolor="#2883D4";
	}
	print '<div style="background:'.$backgroundcolor.'; width:500px; padding:2px 2px 2px 5px;"><span class="deletespan"><a href="av_organization_del.php?id='.$RSview->id.'" class="deletelink" title="DELETE" onclick="return confirm(\'Are sure you want to PERMANENTLY DELETE this Organization?\')"><img src="../images/icon_delete.png" height="12px" border="0" /></a></span><span class="column01span"><a href="av_organization_mod.php?id='.$RSview->id.'" title="Modify This Organization"><a href="av_organization_mod.php?id='.$RSview->id.'">'.$RSview->orgname.'</a></span><span class="column02span"><a href="av_players_viewall.php?oid='.$RSview->id.'">Players</a></span><div class="clear"></div></div>';
}
?>
<div class="clear"></div>
<p>&nbsp;</p>
</div>
<div style="float:left; width:500px;">
<h3>Add an Organization</h3>

<form name="addForm" method="POST" action="av_organization_add.php">

<p><span class="label">Organization Name</span><span class="inputbox"><input name="orgname" type="text" /></span></p>
<p><span class="label">Organization Location</span><span class="inputbox"><input name="orglocation" type="text" /></span></p>
<p><span class="label">Organization Contact Person</span><span class="inputbox"><input name="orgcontactperson" type="text" /></span></p>
<p><span class="label">Organization Contact Number</span><span class="inputbox"><input name="orgcontactnumber" type="text" /></span></p>
<p><span class="label">Organization Email</span><span class="inputbox"><input name="orgemail" type="text" /></span></p>
<p><input type="submit" value="submit" name="submit" /></p>
</form>

</div>

</div>
</div>
</body>
</html>